package alidns

import (
	"net/http"

	"gitee.com/bitwormhole/cloud-aliyun-api/aliyun/openapi"
)

// DeleteDomainRecord 获取域名信息
type DeleteDomainRecord struct {
	Endpoint string

	RecordID string // 'RecordId' (required)

	Lang         string // 'Lang' (optional)
	UserClientIP string // 'UserClientIp' (optional)

}

// PrepareRequest ...
func (inst *DeleteDomainRecord) PrepareRequest() *openapi.Request {

	req := &openapi.Request{
		Task: inst,
	}

	action := "DeleteDomainRecord"
	version := "2015-01-09"

	req.Endpoint = inst.Endpoint
	req.HTTPMethod = http.MethodGet
	req.PathParameters = nil
	req.QueryParameters = nil
	req.Style = openapi.StyleRPC
	req.Action = action
	req.APIVersion = version

	setter := &paramSetter{request: req}

	setter.setParamString("Action", action)
	setter.setParamString("RecordId", inst.RecordID)
	setter.setParamString("Lang", inst.Lang)
	setter.setParamString("UserClientIp", inst.UserClientIP)

	return req
}

// HandleResponse ...
func (inst *DeleteDomainRecord) HandleResponse(req *openapi.Request) error {

	return nil
}
